1. Field of the Invention
The present invention relates to an image processing device that generates drawing data for forming an image while scanning in a main scanning direction.
2. Description of Related Art
With a conventional image forming device, such as a laser printer or copier, drawing data is developed in a storage area of a memory device. The drawing data is image data in a bitmap form that represents each pixel in an image to be formed. Based on the drawing data, scan of one line of the image is performed in a main scanning direction, and scan of successive lines of the image is performed in an auxiliary scanning direction, which is perpendicular to the main scanning direction, whereby the image is formed on a recording medium or the like.
A personal computer is connected to the image forming device. Print commands are outputted from a source such as an application program running on the personal computer. The print commands are inputted to an image processing device, which is provided in the image forming device. In the image processing device, a plurality of drawing commands included within the print commands are executed to draw a virtual image on a virtual image drawing region, which is defined on a storage area of the memory device, for example, thereby generating drawing data (bitmap data) indicative of the virtual image.
Representative examples of the drawing commands include: virtual-image drawing commands for designating positions at which bitmap images (drawing data) are to be drawn; and graphic pattern/font drawing commands that employ data of the coordinates of vertices in a graphic and that employ vector data specifying links between the vertices and data specifying whether or not a framework obtained by the links is to be filled with a color. In order to create a virtual image of a graphic pattern on the storage area of the memory device by using vector data, for example, the graphic pattern to be drawn according to the drawing command is scanned in the main scanning direction, and each pixel of the graphic pattern is drawn virtually into the storage area of the memory device.
An entire image is formed by repeatedly superposing patterns so that the patterns (images, graphic patterns, and/or fonts) which are drawn virtually according to the drawing commands are overwritten by other patterns that are drawn later. Drawing commands specify the positions at which the corresponding patterns are to be drawn over the already-drawn images. An image is finally created in bitmap form and is formed on a recording medium.
The memory device has a storage area, in which a plurality of sets of pixel data are arranged in such a manner that a plurality of pixel groups are arranged sequentially from a leading end to a trailing end of an image along the auxiliary scanning direction and that a plurality of sets of pixel data are arranged in each pixel group from one edge to the other edge of the image in the main scanning direction. Each pixel group therefore includes data for a corresponding line that extends in the main scanning direction.
In other words, in the memory device, storage sections for a plurality of successive lines are provided sequentially from the first line, followed by the second line, the third line, and so on. The storage section for each line stores therein a plurality of successive sets of pixel data, starting from data for the pixel at the start of the scanning direction (the main scanning direction) of the subject line up until data for the pixel at the end of the subject line.
A graphic pattern or the like is drawn virtually on the storage area of the memory device. In order to convert a graphic pattern or the like into drawing data, the start address of a storage section is designated for each scan line (hereinafter called “line”) of the subject graphic pattern or the like. The start address indicates the storage portion for storing data for a pixel (start pixel) located at the start of the subject line (the upstream end of the subject line in the scanning direction). When the graphic pattern or the like is converted into drawing data, pixel data in the drawing data for the start pixel on the subject line is stored in the storage portion specified by the corresponding address. Other pixel data on the subject line is stored in other storage portions that are specified by addresses that are designated relative to the address for the start pixel of the same line.
If some graphic pattern is long in the auxiliary scanning direction, the graphic pattern is made from a large number of lines, each of which extends in the main scanning direction. In such a case, in order to convert the graphic pattern into drawing data, it is necessary to designate an address of the start of line many times. It becomes impossible to store pixel data in consecutive storage portions. The speed at which the graphic pattern is formed decreases.
Especially, now consider a lateral-direction gradation pattern or array pattern, in which a plurality of graphic patterns are consecutively arranged along the main scanning direction and each graphic pattern is long in the auxiliary scanning direction. If the plurality of graphic patterns are drawn one by one when converting the drawing commands for the plurality of graphic patterns into drawing data, the drawing performance for the entire image will decrease.
Japanese unexamined Patent Application Publication No. 2002-63582 has proposed a method of improving the drawing performance in the above-described case. According to this method, drawing commands for drawing a lateral-direction gradation pattern, whose color tone varies in the main scanning direction (lateral direction), are converted into a secondary drawing command for repeatedly drawing in the auxiliary scanning direction a gradation line that extends in the main scanning direction.